#include "Scene/IRenderPriorityGroup.h"
#include "Framework/StableHeaders.h"
#include "Graphics/Pass.h"
#include "Graphics/Technique.h"
#include "Scene/IRenderableCollection.h"


namespace tyro
{
	namespace Scene
	{


		void IRenderPriorityGroup::AddRenderable( Graphics::IRenderable* rend, Graphics::Technique* tech )
		{
			AddSolidRenderable(tech, rend);
		}

		void IRenderPriorityGroup::AddSolidRenderable( Graphics::Technique* tech, Graphics::IRenderable* rend )
		{
			Graphics::Technique::PassList::iterator i;
			Graphics::Technique::PassList* passList = tech->GetPassList();

			for (i = passList->begin(); i != passList->end(); i++)
			{
				solidObjects.AddRenderable((*i), rend);
			}
			
		}

		IRenderPriorityGroup::IRenderPriorityGroup()
		{

		}

		const IRenderableCollection& IRenderPriorityGroup::GetSolidBasic( void ) const
		{
			return solidObjects;
		}



	}
}